3.1 \(\int \tan (c+d x) \, dx\)

Optimal. Leaf size=12 \[ -\frac{\log (\cos (c+d x))}{d} \]

[Out]

-(Log[Cos[c + d*x]]/d)

________________________________________________________________________________________

Rubi [A]  time = 0.004157, antiderivative size = 12, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 6, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {3475} \[ -\frac{\log (\cos (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Int[Tan[c + d*x],x]

[Out]

-(Log[Cos[c + d*x]]/d)

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \tan (c+d x) \, dx &=-\frac{\log (\cos (c+d x))}{d}\\ \end{align*}

Mathematica [A]  time = 0.007772, size = 12, normalized size = 1. \[ -\frac{\log (\cos (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[c + d*x],x]

[Out]

-(Log[Cos[c + d*x]]/d)

________________________________________________________________________________________

Maple [A]  time = 0.002, size = 17, normalized size = 1.4 \begin{align*}{\frac{\ln \left ( 1+ \left ( \tan \left ( dx+c \right ) \right ) ^{2} \right ) }{2\,d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c),x)

[Out]

1/2/d*ln(1+tan(d*x+c)^2)

________________________________________________________________________________________

Maxima [A]  time = 2.50265, size = 15, normalized size = 1.25 \begin{align*} \frac{\log \left (\sec \left (d x + c\right )\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c),x, algorithm="maxima")

[Out]

log(sec(d*x + c))/d

________________________________________________________________________________________

Fricas [A]  time = 1.72891, size = 49, normalized size = 4.08 \begin{align*} -\frac{\log \left (\frac{1}{\tan \left (d x + c\right )^{2} + 1}\right )}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c),x, algorithm="fricas")

[Out]

-1/2*log(1/(tan(d*x + c)^2 + 1))/d

________________________________________________________________________________________

Sympy [A]  time = 0.139407, size = 19, normalized size = 1.58 \begin{align*} \begin{cases} \frac{\log{\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} & \text{for}\: d \neq 0 \\x \tan{\left (c \right )} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c),x)

[Out]

Piecewise((log(tan(c + d*x)**2 + 1)/(2*d), Ne(d, 0)), (x*tan(c), True))

________________________________________________________________________________________

Giac [A]  time = 1.70937, size = 18, normalized size = 1.5 \begin{align*} -\frac{\log \left ({\left | \cos \left (d x + c\right ) \right |}\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c),x, algorithm="giac")

[Out]

-log(abs(cos(d*x + c)))/d